package cn.yerly.sakura.dao.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 * 产品
 * 
 * @author yerly
 *
 */
@Entity
public class Item {
	@Id
	private Long id;
	@ManyToOne
	private Shop shop;
	@ManyToOne
	private ItemInfo itemInfo;
	private Date ctime;
	private Date lastEditTime;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Shop getShop() {
		return shop;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}

	public ItemInfo getItemInfo() {
		return itemInfo;
	}

	public void setItemInfo(ItemInfo itemInfo) {
		this.itemInfo = itemInfo;
	}

	public Date getCtime() {
		return ctime;
	}
	
	public Date getLastEditTime() {
		return lastEditTime;
	}

	public void setLastEditTime(Date lastEditTime) {
		this.lastEditTime = lastEditTime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "Item [id=" + id + ", shop=" + shop + ", itemInfo=" + itemInfo
				+ ", ctime=" + ctime + ", lastEditTime=" + lastEditTime
				+ ", disabled=" + disabled + "]";
	}

	

}
